<template>
  <div class="searchedCookbook">
    <div class="searchedCookbook-navBox">
      <div class="left">
        <div class="searchedCookbook-nav">
          <RouterLink
            :to="{
              path: 'cookbookIntegrate',
              replace: true,
              query: { kw: route.currentRoute.value.query.kw },
            }"
            >综合</RouterLink
          >
        </div>
        <div class="searchedCookbook-nav">
          <RouterLink
            :to="{
              path: 'cookbookCollection',
              replace: true,
              query: { kw: route.currentRoute.value.query.kw },
            }"
            >收藏多</RouterLink
          >
        </div>
        <div class="searchedCookbook-nav">
          <RouterLink
            :to="{
              path: 'cookbookLearn',
              replace: true,
              query: { kw: route.currentRoute.value.query.kw },
            }"
            >学做多</RouterLink
          >
        </div>
      </div>
      <div class="right">
        <div class="searchedCookbook-nav">
          <RouterLink
            :to="{
              path: 'cookbookVideo',
              replace: true,
              query: { kw: route.currentRoute.value.query.kw },
            }"
            >视频</RouterLink
          >
        </div>
        <van-icon
          name="play-circle-o"
          size="16"
          color="#999"
          style="margin-left: 5px"
        />
      </div>
    </div>
    <RouterView />
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";

const route: object = useRouter();
</script>

<style lang="scss" scoped>
.searchedCookbook {
  .searchedCookbook-navBox {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    border-bottom: 1px solid #ebebeb;

    .left {
      display: flex;
      align-items: center;

      > .searchedCookbook-nav {
        margin-right: 16px;
      }
    }

    .right {
      display: flex;
      align-items: center;

      > .searchedCookbook-nav {
        height: 22px;
        // line-height: 16px;
      }
    }

    .searchedCookbook-nav {
      font-size: 14px;

      a {
        color: #999;
      }

      .router-link-active {
        color: black;
        font-weight: bold;
      }
    }
  }
}
</style>
